class SbLog < ActiveRecord::Base
  belongs_to :user
  
  def self.create_log(user,control_name,action_name,obj_id)
    log=SbLog.new(:user_id=>user.id,
                  :last_control=>control_name,
                  :last_action=>action_name,
                  :last_obj_id=>obj_id,
                  :created_at=>Time.now)
    log.save
  end
end
